package com.helloworld;

import com.activity.BaseSeckillTest;
import org.activiti.engine.ProcessEngine;
import org.activiti.engine.ProcessEngines;
import org.activiti.engine.repository.Deployment;
import org.junit.Test;

public class HelloWorld extends BaseSeckillTest{

    ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();

    /**
     * 部署流程定义,开启bpm有bug
     */
    @Test
    public void deploymentProcessDefinition(){
        //getRepositoryService流程定义和部署对象相关的Service
        Deployment deploy = processEngine.getRepositoryService().createDeployment()
                .name("")//添加部署的名称
                .addClasspathResource("diagrams/HelloWorld.xml")//创建一个部署对象
                .addClasspathResource("diagrams/HelloWorld.bpm")
                .deploy();
        System.out.println(deploy.getId());
        System.out.println(deploy.getName());
    }
}
